package cn.luckdou.system.mapper.user;

import java.util.List;
import java.util.Map;

import cn.luckdou.system.model.user.User;
import cn.luckdou.system.model.vo.UserVo;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Select;

/**
 *
 * User 表数据库控制层接口
 *
 */
public interface UserMapper extends BaseMapper<User> {

    UserVo selectUserVoById(@Param("id") Long id);

    List<Map<String, Object>> selectUserPage(Pagination page, Map<String, Object> params);

    @Select("select * from sys_user where id in (select user_id from sys_user_role where role_id=#{id})")
    List<User> selectByRoleId(long id);
}